
  <%= f.error_messages %>
<ul>
  <li class="field">
    <%= f.label :question_id %>
    <%= f.hidden_field :question_id %>
  </li>
  <li class="field">
    <%= f.label :details %>
    <%= f.text_area :details %>
  </li>
  <li class="field">
    <%= f.label :active %>
    <%= f.check_box :active %>
  </li>
  <li class="field">
    <%= f.label :position %>
    <%= f.number_field :position %>
  </li>
</ul>
<% if @survey_image %>
  <%= f.fields_for :survey_images, @survey_image, :child_index => "new_survey_images" do |survey_images_f|%>
    <div class='<%= @survey_image.new_record? ? 'new_fields' : 'fields' %> answer-div'>
      <h3>Image</h3>
      <%= render :partial => 'survey_image', :locals => { :f => survey_images_f } %>
      <div class='clearfix'></div>
    </div>
  <% end %>
<% end %>

  <%= f.fields_for :scores, :child_index => "new_scores" do |score_f|%>
    <div class='fields answer-div'>
      <%= render :partial => 'score', :locals => { :f => score_f } %>
      <div class='clearfix'></div>
    </div>
  <% end %>

<p>
  <%= link_to "New Property", '#add_answer', :class => 'add_association', 'data-association' => "scores" %>
</p>

<div id='scores_fields_template' style='display:none'>
  <div class='new_fields answer-div'>
    <%= f.fields_for :scores, Score.new, :child_index => "new_scores" do |score_f|%>
      <%= render :partial => 'score', :locals => { :f => score_f } %>
    <% end %>
    <div class='clearfix'></div>
  </div>
</div>